
public class Dcai extends AlphaBetaPlayer{
	// The constructor
	public Dcai(int maxDepth)
	{
		super(maxDepth);
	}
	//My calculation for a utility function
	public double evaluateUtility(ConnectFourBoard board)
	{
		if (board.isWinner(myDisc))
			return 1000000;
		if (board.isWinner(myDisc.getOpponent()))
			return -1000000;
		
		double opOne = -board.getOpenRuns(myDisc.getOpponent(), 1).size();
		double opTwo = -board.getOpenRuns(myDisc.getOpponent(), 2).size() *4;
		double opThree = -board.getOpenRuns(myDisc.getOpponent(), 3).size() * 32;
		
		double meOne = board.getOpenRuns(myDisc, 1).size();
		double meTwo = board.getOpenRuns(myDisc, 2).size() *4;
		double meThree = board.getOpenRuns(myDisc, 3).size() * 32;
//		System.out.println(opOne + ", " + opTwo + ", " + opThree + 
//				", " + meOne + ", " +meTwo + ", " + meThree + " = " +
//				(double)(opOne + opTwo + opThree + meOne + meTwo + meThree));
		return (opOne + opTwo + opThree + meOne + meTwo + meThree);
	}
	
	//Just the name
	public String getName()
	{
		return "DC AI";
	}

}
